accept Language
Returns a string that represents the Accept-Language request-header field. This field restricts the set of natural languages that are preferred as a response to the request. For example: da, en-gb;q=0.8, en;q=0.7
. The default Accept-Language is en-us
.
See also: W3 Documentation : Header Field Definitions
Throws
when the profile is deleted or its engine is closed
Configures the accept language. If you do not provide an accept-Language value using this method, then a default accept language will be used. The default Accept-Language is
en-us
.
For example, fr, en-gb;q=0.8, en;q=0.7
would mean: "I prefer French, but will accept British English and other types of English". Note, that all languages which are assigned a quality factor greater than 0 are acceptable.
See also: W3 Documentation : Header Field Definitions
Parameters
a new string that represents the "Accept-Language" HTTP header value
Throws
when language
is empty or blank
when the profile is deleted or its engine is closed